home *** CD-ROM | disk | FTP | other *** search
/ Enter 2010 January / ENTER_2010_01.iso / Programy / Gry / Base_Invaders_ / BaseInvadersSetup1.3.exe / {app} / Scripts / GTest.lua < prev    next >
Encoding:
Text File  |  2007-01-25  |  1.9 KB  |  91 lines

  1. G.SetGroup( "Cam" )
  2. local Cam = G.Create( "Data/BasicCamera.xml");
  3. local pos = Vector3(50,60,50);
  4. Cam.SetPosition( pos );
  5.  
  6. G.File( "Data/Terra.xml");
  7.  
  8.  
  9. function MakeObject( objname )
  10.     local obj = G.Create( objname );
  11.     local mpos = G.GetTerrainIntersection();
  12.     obj.SetPosition( mpos );
  13. end
  14.  
  15. function DooDad()
  16.  
  17.     if( G.KeyTriggered( "T" ) ) then
  18.         local obj = G.Create( "Data\\BaseTower.xml" );
  19.         local mpos = G.GetTerrainIntersection();
  20.         obj.SetPosition( mpos );
  21.         G.Zapit( obj );
  22.     end    
  23.     
  24.     
  25.     if( G.KeyTriggered( "Y" ) ) then
  26.         local mpos = G.GetTerrainIntersection();
  27.         G.ZapStrike( mpos );
  28.     end    
  29.         
  30.     if( G.KeyTriggered( "1" ) ) then
  31.         MakeObject( "DustExplosion" );
  32.     end    
  33.                 
  34.     if( G.KeyTriggered( "2" ) ) then
  35.         MakeObject( "Data\\InvDeathCog.xml" );
  36.     end    
  37.  
  38.     if( G.KeyTriggered( "3" ) ) then
  39.         MakeObject( "Data\\PsychicSphereCog.xml" );
  40.     end        
  41.  
  42.     if( G.KeyTriggered( "E" ) ) then
  43.         MakeObject( "Data\\PsychicMoveCog.xml" );
  44.     end        
  45.         
  46.     if( G.KeyTriggered( "4" ) ) then
  47.         MakeObject( "Data\\NinjaSmokeCog.xml" );
  48.     end    
  49.     if( G.KeyTriggered( "5" ) ) then
  50.         MakeObject( "Data\\AuraCog.xml" );
  51.     end    
  52.     
  53.     if( G.KeyTriggered( "6" ) ) then
  54.         MakeObject( "Data\\PoisonedCog.xml" );
  55.     end                                
  56.                             
  57.     if( G.KeyTriggered( "7" ) ) then
  58.         MakeObject( "Data\\OnFireCog.xml" );
  59.     end    
  60.     
  61.     if( G.KeyTriggered( "8" ) ) then
  62.         MakeObject( "Data\\DumbCog.xml" );
  63.     end    
  64.  
  65.     if( G.KeyTriggered( "9" ) ) then
  66.         MakeObject( "Data\\SparkCog.xml" );
  67.     end    
  68.             
  69.     if( G.KeyTriggered( "0" ) ) then
  70.         MakeObject( "Data\\StarsCog.xml" );
  71.     end    
  72.     
  73.     if( G.KeyTriggered( "R" ) ) then
  74.         MakeObject( "Data\\RainCell.xml" );
  75.     end    
  76.             
  77.     if( G.KeyTriggered( "C" ) ) then
  78.         G.TerraInfo( "test.xml" );
  79.     end        
  80.         
  81. end
  82.  
  83. function ScreenCapFunc()    
  84.     if( G.KeyTriggered( "SysReq" ) ) then
  85.         G.ScreenCap()
  86.     end
  87. end
  88. GMain["ScreenCapFunc"] = ScreenCapFunc;
  89.  
  90.  
  91. GMain[ "DooDad" ] = DooDad;